package com.tz.crm.controller.customer;

import com.tz.crm.entity.User;
import com.tz.crm.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by sztzedu on 17-3-13.
 */
@Controller
@RequestMapping(value = "/customer")
public class SelectOwnerContorller {

    @Resource
    private UserService userService;

    @RequestMapping(value = "/initOwnerList")
    public String listOwner(HttpServletRequest request){
        List<User> userList = userService.getAll();
        request.getSession().setAttribute("userList",userList);
        return "selectOwner";
    }

}
